<!--
/*
 * SPDX-License-Identifier: GPL-3.0-or-later
 * Copyright 2014 The moOde audio player project / Tim Curtis
 * Copyright 2013 The tsunamp player ui / Andrea Coiutti & Simone De Gregori
 *
 * 汉化：Androidnews
 *
*/
-->
<div id="container">
<div class="container">
	<h1 class="lib-config">音乐库</h1>

	<form class="form-horizontal" method="post">
		<legend>音乐来源</legend>
		<p class="sub-legend">
			当歌曲文件位于网络中的另一台计算机上时,创建音乐源.
			保存或删除源后,返回播放或库,然后从菜单中选择“更新库”.
		</p>

		<div class="control-group">
			<a href="lib-config.php?cmd=add"><button class="btn btn-medium btn-primary config-btn">创建</button></a>
			<span class="config-btn-after">音乐来源</span>

			<div>$_mounts</div>

			<a href="#remount-sources" data-toggle="modal"><button class="btn btn-medium btn-primary config-btn">重新安装</button></a>
			<span class="config-btn-after">音乐来源</span>
			<a aria-label="Help" class="config-info-toggle" data-cmd="info-remount-sources" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
			<span id="info-remount-sources" class="config-help-info">
				Unmount all music sources then re-mount them.
			</span>

			<div>
				<div class="toggle">
					<label class="toggle-radio toggle-fs-mount-monitor" for="toggle-fs-mount-monitor-2">开</label>$_select[fs_mountmon_on]
					<label class="toggle-radio toggle-fs-mount-monitor" for="toggle-fs-mount-monitor-1">关</label>$_select[fs_mountmon_off]
				</div>
				<span class="config-toggle-after">安装监视器</span>
				<button id="btn-set-fs-mountmon" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_fs_mountmon" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-mount-monitor" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-mount-monitor" class="config-help-info">
					Attempt to automatically restore Music Source mounts that become temporarily unavailable due to network or file sharing service interruption.
					Due to the protocols used in SMB and NFS there can be long timeouts when checking a mount or performing a re-mount.
					Refer to the file /var/log/moode_mountmon.log when Debug logging is on.
				</span>
			</div>
		</div>

		<legend>音乐数据库</legend>
		<p class="sub-legend">
			音乐数据库由MPD在扫描音乐收藏期间提取的曲目元数据组成
			加上moOde生成并存储在标记缓存中的自定义元数据.
		</p>

		<div class="control-group">
			<div>
				<a href="#regen-mpddb" data-toggle="modal"><button class="btn btn-medium btn-primary config-btn">重新生成</button></a>
				<span class="config-btn-after">音乐数据库</span>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-regen-mpddb" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-regen-mpddb" class="config-help-info">
					Regenerate the music database and update the album cover thumbnail cache.
	            </span>
			</div>

			<div>
				<a href="#clear-libcache" data-toggle="modal"><button class="btn btn-medium btn-primary config-btn">清除</button></a>
				<span class="config-btn-after">库标记缓存</span>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-clear-libcache" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-clear-libcache" class="config-help-info">
					The tag cache contains custom metadata and will be created when returning to Playback or Library view.
	            </span>
			</div>

			<div>
				<div class="toggle">
					<label class="toggle-radio toggle-cuefiles-ignore" for="toggle-cuefiles-ignore-2">开</label>$_select[cuefiles_ignore_on]
					<label class="toggle-radio toggle-cuefiles-ignore" for="toggle-cuefiles-ignore-1">关</label>$_select[cuefiles_ignore_off]
				</div>
				<span class="config-toggle-after">忽略CUE文件</span>
				<button id="btn-set-cuefiles-ignore" class="hide btn btn-primary btn-small btn-submit config-btn-set" type="submit" name="update_cuefiles_ignore" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-cuefiles-ignore" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-cuefiles-ignore" class="config-help-info">
					This can help prevent duplicate tracks entries when a .cue file is present in the album directory.
					After changing this setting return to Playback or Library then select "Update library" from the Menu.
		        </span>
			</div>
		</div>

		<legend>缩略图生成器</legend>
		<p class="sub-legend">
			专辑封面缩略图用于填充库视图、播放栏和队列.
			“首选项”的“播放”和“库”部分包含缩略图的选项.
		</p>

		<div class="control-group">
			<div>
				<a href="#regen-thmcache" data-toggle="modal"><button class="btn btn-medium btn-primary config-btn">重新生成</button></a>
				<span class="config-btn-after">专辑封面缩略图缓存</span>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-regen-thmcache" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-regen-thmcache" class="config-help-info">
					Regenerate the album cover thumbnail cache by first deleting it and then re-populating it with newly generated thumbnails.
	            </span>
			</div>

			<div>
				<a id="view-thmcache-status" href="#notarget"><button class="btn btn-medium btn-primary config-btn">查看状态</button></a>
				<span id="thmcache-status" class="config-btn-after">$_thmcache_status</span>
			</div>
		</div>
	</form>
</div>
</div>

<form class="form-horizontal" method="post">
	<div id="remount-sources" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="remount-sources-label" aria-hidden="true">
		<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3>重新安装音乐来源?</h3>
		</div>
		<div class="modal-body"></div>
		<div class="modal-footer">
			<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
			<button class="btn btn-primary btn-submit" type="submit" name="remount_sources" value="novalue">确认</button>
		</div>
	</div>
</form>

<form class="form-horizontal" method="post">
	<div id="regen-mpddb" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="regen-mpddb-label" aria-hidden="true">
		<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3>重新生成音乐数据库?</h3>
		</div>
		<div class="modal-body"></div>
		<div class="modal-footer">
			<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
			<button class="btn btn-primary btn-submit" type="submit" name="regen_library" value="novalue">确认</button>
		</div>
	</div>
</form>

<form class="form-horizontal" method="post">
	<div id="clear-libcache" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="clear-libcache-label" aria-hidden="true">
		<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3>清除库标记缓存?</h3>
		</div>
		<div class="modal-body"></div>
		<div class="modal-footer">
			<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
			<button class="btn btn-primary btn-submit" type="submit" name="clear_libcache" value="novalue">确认</button>
		</div>
	</div>
</form>

<form class="form-horizontal" method="post">
	<div id="regen-thmcache" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="regen-thmcache-label" aria-hidden="true">
		<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3>重新生成缩略图缓存?</h3>
		</div>
		<div class="modal-body"></div>
		<div class="modal-footer">
			<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
			<button class="btn btn-primary btn-submit" type="submit" name="regen_thmcache" value="novalue">确认</button>
		</div>
	</div>
</form>
